#!/bin/sh

date=`date -d "70 days ago" +%Y-%m-%d`
baidu_dir=baidu_xiaofei_info_dir
toutiao_dir=toutiao_download_file_dir

echo $date
delete_data() {
   if [ ! -d $1 ];then
        log " $1 directory doesn't exists !"
   else
       rm -rf $1
       if [ $? -ne 0 ];then
            log " delete $1 failed!"
       else
            log " delete $1 success!"
       fi
   fi
}

delete_data $baidu_dir/$date
delete_data $toutiao_download_file_dir/$date
